package Service;

import Utils.PageSplit;
import Utils.SqlSessionFactoryUtil;
import dao.HouseDao;
import entity.House;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class HouseService {
   public SqlSession session;

    /**
     *
     * @param pageSplit
     * @return
     */
    public List<House> houseList(PageSplit pageSplit){
        session= SqlSessionFactoryUtil.getSqlSession();
      HouseDao houseDao =   session.getMapper(HouseDao.class);
      List<House> houseList =  houseDao.houseList(pageSplit);
      session.close();
      return houseList;

    }
}
